﻿using System;

namespace _26_调用基类的构造函数_继承与多态
{
    class Program
    {
        static void Main(string[] args)
        {
            B v = new B();
            Console.WriteLine($"Value 1= {v.Value1}");
            Console.WriteLine($"Value 2={v.Value2}");
        }
    }
    class A
    {
        public A(int v1,int v2)
        {
            Value1 = v1;
            Value2 = v2;
        }
        public int Value1 { get; }
        public int Value2 { get; }
    }

    //声明B类，从A类派生
    class B:A
    {
        public B() : base(900, 750) { }
    }
}
